package com.bite.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class LoggerController {
    //private static Logger logger = LoggerFactory.getLogger(LoggerController.class);

    @RequestMapping("/logger")
    public String logger(){
        log.trace("---------trace---------");
        log.debug("---------debug---------");
        log.info("---------info---------");
        log.warn("---------warn---------");
        log.error("---------error---------");
        return "打印日志";
    }
}
